package pro.shushi.pamirs.hr.api.model.eam;

import pro.shushi.pamirs.boot.base.ux.annotation.view.UxDetail;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxForm;
import pro.shushi.pamirs.hr.api.enums.eam.MtoolPjTypeEnum;
import pro.shushi.pamirs.hr.api.enums.eam.UkCycTypeEnum;
import pro.shushi.pamirs.hr.api.enums.eam.UkDevStatEnum;
import pro.shushi.pamirs.hr.api.enums.eam.UkMtdEnum;
import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.base.IdModel;

// 模型中UX开头的注解(UxForm/UxTable/UxDetail等)可以不用写，都可在设计器中进行可视化配置; 代码里面写这些注解是为了默认页面的交互
@UxForm(grid = 3)
@UxDetail(grid = 3)
@Model.model(EamUkDt.MODEL_MODEL)
@Model(displayName = "保养单明细表",labelFields = {"mmdCode","mmdName"})
@Model.Advanced(table="eam_uk_dt",unique = {"orgCode, ukCode, pjCode, seq"})
public class EamUkDt extends IdModel {

    public static final String MODEL_MODEL = "hr.simple.eamUkDt";

    @Field(displayName = "组织编码", invisible = true)
    private String orgCode;

    @Field(displayName = "保养单编码", invisible = true)
    public String ukCode;

    //序号自增 TODO
    @Field.Integer
    @Field(displayName = "序号",  invisible = true)
    public Integer seq;

    @Field.Enum(size='4')
    @Field(displayName = "保养类型",  required = true,priority = 3L)
    public UkCycTypeEnum ukCycType;

    @Field(displayName = "项目编码", invisible = true)
    public String pjCode;

    @Field(displayName = "项目名称", required = true,priority = 6L)
    public String pjName;

    @Field.Enum(size='4')
    @Field(displayName = "保养项类型", required = true)
    public MtoolPjTypeEnum pjType;

    @Field.Enum(size='4')
    @Field(displayName = "方法", required = true)
    public UkMtdEnum ukMtd;

    @Field.String(size = 512)
    @Field(displayName = "标准")
    private String ukStd;

    @Field.String(size = 512)
    @Field(displayName = "实测值")
    private String rvalue;

    @Field.Enum(size='4')
    @Field(displayName = "质量状态", required = true)
    public UkDevStatEnum ukDevStat;

    @Field.String(size = 512)
    @Field(displayName = "不符合项内容")
    private String ukNgCtt;

    @Field.String(size = 512)
    @Field(displayName = "纠正措施")
    private String ukNgMtd;

    @Field.Integer
    @Field(displayName = "用时（分钟）", required = true, defaultValue = "0")
    public Integer ukDpart;


    @Field.Text
    @Field(displayName = "备注")
    private String remark;


}
